import request from "@/utils/request";
import { encryptionData } from "@/utils/com";
import Qs from "qs";

/* 装修维权-列表 */
export function zbbDecorationRightsProtectionList(data) {
  return request({
    url: "/jcd-sys/zbbDecorationRightsProtection/pcList",
    method: "get",
    headers: encryptionData(
      data,
      "/jcd-sys/zbbDecorationRightsProtection/pcList"
    ),
    params: data
  });
}

/* 装修维权-标记为受理 */
export function zbbDecorationRightsProtectionDeal(id) {
  return request({
    url: `/jcd-sys/zbbDecorationRightsProtection/deal/${id}`,
    method: "put",
    headers: encryptionData(
      {},
      `/jcd-sys/zbbDecorationRightsProtection/deal/${id}`
    ),
    data: Qs.stringify({})
  });
}

/* 装修维权-填写处理结果 */
export function zbbDecorationRightsProtectionComplete(data) {
  return request({
    url: `/jcd-sys/zbbDecorationRightsProtection/complete`,
    method: "put",
    headers: encryptionData(
      data,
      `/jcd-sys/zbbDecorationRightsProtection/complete`
    ),
    data: Qs.stringify(data)
  });
}

/* 装修维权-详情 */
export function zbbDecorationRightsProtectionDetails(id) {
  return request({
    url: `/jcd-sys/zbbDecorationRightsProtection/details/${id}`,
    method: "get",
    headers: encryptionData(
      {},
      `/jcd-sys/zbbDecorationRightsProtection/details/${id}`
    ),
    data: Qs.stringify({})
  });
}
